#ifndef DSPSIMULATOR_CONTROLREGISTER_H
#define DSPSIMULATOR_CONTROLREGISTER_H

#include <simulator/targetMachine/register.h>
#include <simulator/type/type.h>

class CReg : public Register<u32> {
private:
    u32 m_mask;                      // 控制寄存器的掩码，控制寄存器的某些bit位为reserve，恒为0
public:
    CReg(std::string name, u32 mask);

    ~CReg() override = default;

    u32 *getDataPtr() override;

    void updateData(u32 data) override;
};

#endif //DSPSIMULATOR_CONTROLREGISTER_H
